package com.zhn.usermanager.controller;

import com.zhn.usermanager.service.impl.ExportExcelServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 批量下载
 */
@Controller
@RequestMapping("user")
public class ExportExcelController {
    @Resource
    private ExportExcelServiceImpl exportExcelService;

    @GetMapping("exportExcel")
    public void exportExcel(@RequestParam String ids, HttpServletResponse response) throws IOException {
        exportExcelService.exportExcel(ids, response);
    }
}
